<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      	xmlns:ui="http://java.sun.com/jsf/facelets"
      	xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:p="http://primefaces.org/ui">
<h:head>
  <title>#{msg['applicationshortname.label']} | #{pageName}</title>
  <link type="text/css" rel="stylesheet" href="${request.contextPath}/resources/styles/wam.css" />
</h:head>

<h:body styleClass="body">
<h:panelGrid styleClass="pnlGrd main" style="margin: 0 auto; width: 1000px; text-align: left; ">
<ui:insert name="header">
<h:form id="approveDomesticProjectAssignmentForm">
			<p:growl id="growl"></p:growl>
			<h:panelGrid columns="2" style="width: 100%; height: 34px;"> 
			<h:outputLabel value="#{msg['approveprojectassinmentdomestic.lable.heading']}" styleClass="outputTextTitle" style="color: white; font-size: 20px;" />
			<p:commandButton value="Login" action="login" />
				
</h:panelGrid>
<br />
<br />
<!-- APPROVE PROJECT ASSIGNMENT FORM -->

				
				<p:panel header="#{msg['employeedetails.label']}"  style="border: 1px solid #d9d9d9; width:90%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="border: 1px solid #d9d9d9; background-color: #FFE4C4;  border: 1px solid #F5AD66; width:100%" cellspacing="5">  
				
					<h:outputLabel value="#{msg['projectassignmentid.lable']}"/>
					<h:outputLabel value=" : " />
					<p:inputText  value="#{approveDomesticProjectAssignmentBean.projectAssignment.projectAssignmentCode}" readonly="true"/> 
					<h:inputHidden  />
					<h:outputLabel value="#{msg['createdate.label']}" />
					<h:outputLabel value=" : " />
					<p:calendar pattern="dd/MM/yyy" value="#{approveDomesticProjectAssignmentBean.projectAssignment.createDate}"  showButtonPanel="true"/>
					
					<h:outputLabel value="#{msg['employeename.label']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText  readonly="true" value="#{approveDomesticProjectAssignmentBean.projectAssignment.employee.firstName} #{approveDomesticProjectAssignmentBean.projectAssignment.employee.lastName}"/>
					<h:inputHidden  />
					<h:outputLabel value="#{msg['employeeid.label']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText value="#{approveDomesticProjectAssignmentBean.projectAssignment.employee.employeeCode}" readonly="true"/> 
									
					<h:outputLabel value="#{msg['contactnumber.label']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText value="#{approveDomesticProjectAssignmentBean.projectAssignment.contactNumber}"  />
					<h:inputHidden  />
					<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText value="#{approveDomesticProjectAssignmentBean.projectAssignment.emergencycontactNumber}" />  
	                
	                <h:outputLabel value="#{msg['approvedby.lable']}"/>
	                <h:outputLabel value=" : " />
		            <p:inputText  value="#{approveDomesticProjectAssignmentBean.projectAssignment.approvedBy}"  readonly="true"/>
						
	
			</h:panelGrid>
			</p:panel>
			<p:panel header="#{msg['assignmentdetails.label']}"   style="border: 1px solid #d9d9d9; width:90%"> 
			<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1"  
					 style=" width:100%" cellspacing="5">
				
					<h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputText value="Choose Project" />
					</h:panelGroup>
					<h:outputLabel value=" : " />
					<p:selectOneMenu value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.projectId}" style="width:160px;">
					<f:selectItems value="#{approveDomesticProjectAssignmentBean.projectsMap}" />
					<p:ajax event="change" listener="#{approveDomesticProjectAssignmentBean.projectChangeListener}" update="projectName,clientAddress,client,clientLocation,contactPerson,contactNumber,periodFrom,periodTo,recommendedBy"/>
					</p:selectOneMenu>
					<h:inputHidden />
					<h:outputLabel value="#{msg['recommendedby.lable']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText id="recommendedBy" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.owner.firstName} #{approveDomesticProjectAssignmentBean.projectAssignment.project.owner.lastName}" readonly="true"/>  
					
					
					<h:panelGroup>
					<p:spacer></p:spacer>
					<p:spacer></p:spacer>
					<h:outputLabel value="#{msg['projectname.label']}"/>
					</h:panelGroup>
					<h:outputLabel value=" : " />
		            <p:inputText id="projectName" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.projectName}" readonly="true"/>
					<h:inputHidden  /> 					 	
					<h:outputLabel value="#{msg['clientaddress.label']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText id="clientAddress" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.clientAddress}"  readonly="true"/>
					
					<h:panelGroup>
					<p:spacer></p:spacer>
					<p:spacer></p:spacer>
					<h:outputLabel value="#{msg['clientname.label']}"/>
					</h:panelGroup>
					<h:outputLabel value=" : " />
					<p:inputText  id="client" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.client}" readonly="true"/>
					<h:inputHidden  />
					<h:outputLabel value="#{msg['clientlocation.label']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText  id="clientLocation" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.clientLocation}" readonly="true"/> 
					
										
					<h:panelGroup>
					<p:spacer></p:spacer>
					<p:spacer></p:spacer>
					<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
					</h:panelGroup>
					<h:outputLabel value=" : " />
					<p:inputText id="contactPerson"  value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.contactPerson}"  readonly="true"/>
					<h:inputHidden  />
					<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
					<h:outputLabel value=" : " />
		            <p:inputText  id="contactNumber" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.contactNumber}" readonly="true"/>
					
					
					<h:panelGroup>
					<p:spacer></p:spacer>
					<p:spacer></p:spacer>
					<h:outputLabel value="#{msg['projectstratdate.label']}"/>
					</h:panelGroup>
					<h:outputLabel value=" : " />
					<p:calendar id="periodFrom" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.periodFrom}"  showButtonPanel="true" disabled="true"/>
					<h:inputHidden  />
					<h:outputLabel value="#{msg['projectenddate.label']}"/>
					<h:outputLabel value=" : " />
		            <p:calendar id="periodTo" value="#{approveDomesticProjectAssignmentBean.projectAssignment.project.periodTo}"  showButtonPanel="true" disabled="true"/>
				</h:panelGrid>
				</p:panel>
				<p:panel header="#{msg['assignmentallowancedetails.label']}"   style="border: 1px solid #d9d9d9; width:90%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
				 style="width:100%" cellspacing="5">
				
					
					 <h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="#{msg['dailyallowance.lable']}"/>
					</h:panelGroup>
					<h:outputLabel value=" : " />					 
	                <p:inputMask id="dailyAllowance" mask="99999.99" value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.dailyAllowance}"  >
		                  <f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
		                  <p:watermark for="dailyAllowance" value="00000.00" />
		            </p:inputMask>
		            <h:inputHidden  />  
		             <h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="#{msg['advanceamount.lable']}"/>
					</h:panelGroup> 
					<h:outputLabel value=" : " />
				   	<p:inputMask mask="99999.99" id="advanceAmount" value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.advanceAmount}">
							<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
	 						<p:watermark for="advanceAmount" value="00000.00" />
							<p:ajax event="change" listener="#{approveDomesticProjectAssignmentBean.advanceAmountChangeListener}" update="totalAmount"/>
					</p:inputMask>
					 
					
					 <h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="#{msg['advanceamountbydate.lable']}"/>
					</h:panelGroup> 
					<h:outputLabel value=" : " />
					<p:calendar value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.advanceByDate}" showButtonPanel="true" />
					<h:inputHidden />
					 <h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="#{msg['paymentcycle.lable']}"/>
					</h:panelGroup> 
					<h:outputLabel value=" : " />
					<p:calendar value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.paymentCycleDate}" showButtonPanel="true" />
	              
					
					 <h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="Additionals"/>
					</h:panelGroup> 
					<h:outputLabel value=" : " />
					<p:selectOneMenu id="options" value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.additionals}"  style="width:160px;">
				 			<f:selectItem itemLabel="Select Additional"/>
				         	<f:selectItem itemLabel="By ERPandERP" itemValue="By ERPandERP"/>  
							<f:selectItem itemLabel="By Client" itemValue="By Client" />    
                    </p:selectOneMenu> 
                    <h:inputHidden  />
					<h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="#{msg['roomrentadvance.lable']}"/>
					</h:panelGroup> 
					<h:outputLabel value=" : " />
					<p:inputMask mask="99999.99" id="roomRentAdvance" value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.roomRentAdvance}"  >
					<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
					<p:watermark for="roomRentAdvance" value="00000.00" />
					<p:ajax event="change" listener="#{approveDomesticProjectAssignmentBean.roomRentAdvanceChangeListener}" update="totalAmount"/>
					</p:inputMask>
					
					<h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="#{msg['roomrentpermonth.lable']}"/>
					</h:panelGroup> 
					<h:outputLabel value=" : " />
					<p:inputMask mask="99999.99" id="roomRentPerMonth" value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.roomRentPerMonth}"  >
					<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
					<p:watermark for="roomRentPerMonth" value="00000.00" />
					</p:inputMask>
					<h:inputHidden  />
					<h:panelGroup>
					<h:outputLabel value="*" style="color : red;" />
					<h:outputLabel value="#{msg['totalamount.lable']}"/>
					</h:panelGroup> 
					<h:outputLabel value=" : " />
					<p:inputMask mask="99999.99" id="totalAmount" value="#{approveDomesticProjectAssignmentBean.projectAssignmentDetail.totalAdvance}">
							<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
							<p:watermark for="totalAmount" value="00000.00" />
					</p:inputMask>
					
				</h:panelGrid>
				</p:panel>
				<p:panel header="Comments" style="border: 1px solid #d9d9d9; width:90%"> 
				<h:panelGrid columns="2" rendered="#{approveDomesticProjectAssignmentBean.renderRecommend}" columnClasses="grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned,grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned" 
							 style=" width: 100%">
							 <h:panelGroup>
							  <h:outputLabel value="*" style="color : red;"/>
							<h:outputLabel  value="#{msg['recommenderscomments.lable']}" />
							<h:outputLabel value=" : " />
							</h:panelGroup>
		                    <p:inputTextarea     style="border: 1px solid #d9d9d9; width: 70%" id="recommendersComments" value="#{approveDomesticProjectAssignmentBean.projectAssignment.recommendationRemarks}"/>
							  
							
				</h:panelGrid>
					<h:panelGrid columns="2"  rendered="#{approveDomesticProjectAssignmentBean.renderApprove}" columnClasses="grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned,grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned" 
							 style=" width: 100%">
							  <h:panelGroup>
							  <h:outputLabel value="*" style="color : red;"/>
							  <p:spacer></p:spacer>
							<h:outputLabel  value="#{msg['approverscomments.label']}" />
							 <h:outputLabel value=" : " />
							 </h:panelGroup>
							 <p:inputTextarea   style="border: 1px solid #d9d9d9; width: 70%" id="approversComments" value="#{approveDomesticProjectAssignmentBean.projectAssignment.approvalRemarks}"/>
				</h:panelGrid>
				
				</p:panel>
				<h:panelGrid columns="1" style=" width:90%">
		<h:panelGroup style="float:right;">
					<p:commandButton rendered="#{approveDomesticProjectAssignmentBean.renderRecommend}" id="recommendButton" update="growl" value="Recommend" action="#{approveDomesticProjectAssignmentBean.recommendDomesticProjectAssignment}" />
		        	<p:commandButton rendered="#{approveDomesticProjectAssignmentBean.renderApprove}" id="approveButton" update="growl" value="Approve" action="#{approveDomesticProjectAssignmentBean.approveDomesticProjectAssignment}" />
		        	<p:commandButton rendered="#{approveDomesticProjectAssignmentBean.renderReject}" id="rejectButton" update="growl" value="Reject"  action="#{approveDomesticProjectAssignmentBean.rejectDomesticProjectAssignment}"/>
    	</h:panelGroup> 
    
	
	</h:panelGrid>
				
				
		        
			
	</h:form>  
	</ui:insert>
	<ui:insert name="footer">
		<h:outputLabel value="&#169; 2012 #{msg['companyname.label']}" style="color: #888888; font-size: 12px;"/> 
	</ui:insert>
	
</h:panelGrid>
</h:body>

</html>
